IF EXIST "%RoleRoot%\App1Install_Success.txt" (
ECHO Application 1 is already installed. Exiting. >> "%TEMP%\StartupLog.txt" 2>&1
GOTO AfterApp1Install
)

reg add HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell /v ExecutionPolicy /d Unrestricted /f
powershell .\startup.ps1 

ECHO This line will create a file to indicate that Application 1 installed correctly. > "%RoleRoot%\App1Install_Success.txt"

shutdown -t 300 -r

:AfterApp1Install